package com.tte.common.designpattern.builder;

import com.tte.common.designpattern.builder.drink.Coffee;
import com.tte.common.designpattern.builder.drink.Coke;
import com.tte.common.designpattern.builder.drink.Tea;
import com.tte.common.designpattern.builder.food.Hamburger;
import com.tte.common.designpattern.builder.food.Noodles;
import com.tte.common.designpattern.builder.food.Rice;

/**
 * 建造类
 */
public class MealBuilder {

    /**
     * 准备面条
     * @return
     */
    public Meal prepareNoodles(){
        Meal meal = new Meal();
        meal.addItem(new Noodles());
        meal.addItem(new Tea());
        return meal;
    }

    /**
     * 准备汉堡
     * @return
     */
    public Meal prepareHumburger(){
        Meal meal = new Meal();
        meal.addItem(new Hamburger());
        meal.addItem(new Coffee());
        return meal;
    }

    /**
     * 准备米饭
     * @return
     */
    public Meal prepareRice(){
        Meal meal = new Meal();
        meal.addItem(new Rice());
        meal.addItem(new Coke());
        return meal;
    }
}